
	function findPrimeNumbersInRange( minNum, maxNum, maxPrimes ){

		var	primeNumbers = [],
			nonPrimes = [],
			testVal = (minNum < 2) ? 2 : minNum,
			startTest = 2,
			testProduct;
		while( testVal <= maxNum && primeNumbers.length < maxPrimes ){
			if ( nonPrimes.lastIndexOf(testVal) != -1 )
			{
				++testVal;
				continue;
			}
            primeNumbers.push(testVal);
			while ( (testVal * startTest) <= maxNum ){
				testProduct = testVal * startTest;
				nonPrimes.push(testProduct);
				++startTest;
			}
			++testVal;
			startTest = testVal + 1;
		}
		return primeNumbers;
	}